So I was stumped for quite a while on how I was going to approach my program, but I have made a lot of headway into what I am going to do. Basically I decided that while retaining all of the original pixel information of the first image, I want to rearrange the pixels based on their light and dark values.

In order to do that (and this is one of the areas that had me stumped for quite some time), you have to create a one-dimensional array based off of the average of the RGB values of each pixel. Then the pixels need to be sorted (I have not decided on my sorting method yet) based on their order.

Now here is the tricky part, once I have the new pixel array created, I have to reapply it to the original pixel array so that it can be updated and changed. This may sound like an easy thing to do, but it definitely took some ingenuity on my part.

Though I have yet to start working on the sorting method, I have been looking up a few, and I want to use the quicksort method because it seems to be the most efficient sorting algorithim that has been written and I want my program to run as fast as possible with as few memory leaks as possible.

The problem that I have been having with using the quicksort method as opposed to the bubblesort or others is that it has never been done before in processing, so I have no code to reference myself to besides the psuedo-code.

This normally would not be too much of a problem, but the psuedo-code includes using pointers, which I have come to find that processing does not have. Hopefully I will be able to write up a work around because I would really prefer to use the more powerful sorting method.